export const useTagsViewStore = defineStore("big-tagsView", () => {
  const visitedViews = ref([]);
  const addVisitedView = (view) => {
    // 判断是否存在
    if (visitedViews.value.some((v) => v.path === view.path)) return;
    // 不存在则添加
    visitedViews.value.push(
      Object.assign({}, view, {
        title: view.meta.title || "no-name",
      })
    );
  };
  return {
    visitedViews,
    addVisitedView,
  };
});
